﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PutOutCardDetailed.aspx.cs"
    Inherits="CardLogistics.Web.MainPage.PutOutCard.PutOutCard.PutOutCardDetailed" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="../../../Controls/WebUserControl_Nav.ascx" TagName="WebUserControl_Nav"
    TagPrefix="uc1" %>
<%@ Register Src="../../../Controls/WebUserControl_ToolBar.ascx" TagName="WebUserControl_ToolBar"
    TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>半成品/成品卡出库明细</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/selPage.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../../js/jquery.js"></script>
    <script src="../../../js/jquery.tipswindow.2.0.js" type="text/javascript"></script>
    <script src="../../../js/valReq.js" type="text/javascript"></script>
    <script src="../../../js/tblistjs.js" type="text/javascript"></script>
    <script src="../../../js/CreateControl.js" type="text/javascript"></script>
    <script src="../../../js/FormatDate.js" type="text/javascript"></script>
    <script type="text/javascript">
        //搜索按钮执行函数
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
        function queryData() {
            var ReportViewer = document.getElementById("ReportViewer");
            var putOutCardNo = GetQueryString("PutOutCardNo"); //出库单号
            ReportViewer.Stop();
            var DataURL = encodeURI("PutOutCardDetailedRpt.aspx?putOutCardNo=" + putOutCardNo);
            ReportViewer.DataURL = DataURL;

            //给报表设计器赋值参数
            var supName = decodeURI(decodeURI(GetQueryString("SupName"))); //供应商
            var cardType = decodeURI(decodeURI(GetQueryString("CardType"))); //卡类型
            var applyNo = GetQueryString("ApplyNo"); //申领单号
            var putOutCardDate = GetQueryString("PutOutCardDate"); //出库日期
            var receiptno = GetQueryString("receiptno"); //收据号
            //格式化后日期为：yyyy-MM-dd HH:mm:ss
            var currentdate = FormatToDate(putOutCardDate);
            ReportViewer.Report.ControlByName("PutOutCardNo").AsMemoBox.Text = putOutCardNo; //半成品/成品卡出库单号
            ReportViewer.Report.ControlByName("SuppliersName").AsMemoBox.Text = supName; //供应商
            ReportViewer.Report.ControlByName("CardtypeName").AsMemoBox.Text = cardType; //卡类型
            ReportViewer.Report.ControlByName("ApplyNo").AsMemoBox.Text = applyNo; //申领单号
            ReportViewer.Report.ControlByName("receiptno").AsMemoBox.Text = receiptno; //收据号
            //出库日期
            if (currentdate == "NaN-NaN-NaN NaN:NaN:NaN") {
                ReportViewer.Report.ControlByName("PutOutCardDate").AsMemoBox.Text = "";
            } else
                ReportViewer.Report.ControlByName("PutOutCardDate").AsMemoBox.Text = currentdate;

            ReportViewer.Start();
        }


    </script>
</head>
<body onload="queryData();">
    <form runat="server" id="f2">
    <div class="rightinfo">
    <!--
        <ul class="seachform">
            <li>
                <label>
                    出库单号</label>
                <input id="PutOutCardNo" runat="server" readonly="readonly" type="text" style="width: 200px;"
                    class="dfinputImg" />
                <asp:HiddenField ID="hf_PutOutCardId" runat="server" />
                <input type="hidden" id="SupName" runat="server" />
                <input type="hidden" id="CardType" runat="server" />
                <input type="hidden" id="ApplyNo" runat="server" />
                <input type="hidden" id="PutOutCardDate" runat="server" />
                <input type="hidden" id="receiptno" runat="server" />
            </li>
            <li>
                <label>
                    &nbsp;</label>
                <input id="btnSearch" type="button" class="scbtn" value="查询" onclick="queryData();" />
            </li>
        </ul>
        -->
        <div style="z-index: 111111;">
            <script type="text/javascript">
                var divkuangH = $(window).height();
                var viewH = divkuangH - 117 + 100 - 1;
                CreatePrintViewerEx("100%", viewH, '../../../grf/PutOutCardDetailed.grf', "", false);
            </script>
        </div>
    </form>
</body>
</html>
